Ext.define('Era.view.PreviewWindow',{
    extend: 'Ext.window.Window',
    alias: 'widget.previewwindow',
    layout: 'vbox',
    
    width: 400,
    height: 400,
    
    modal: false,
    resizable: false,
    closable: false,
    shadow: false,
    
    initComponent: function() {
        this.items = [
            {
                xtype: 'label',
                text: this.record.get('title')
            },
            {
                xtype: 'label',
                text: this.record.get('description')
            },
            {
                xtype: 'label',
                text: this.record.get('estimate')
            },
            {
                xtype: 'label',
                text: this.record.get('preparation')
            },
            {
                xtype: 'label',
                text: this.record.get('priority')
            },
            {
                xtype: 'label',
                text: this.record.get('star_date')
            },
            {
                xtype: 'label',
                text: this.getTMinus(this.record.get('star_date'))
            }
        ]
        
        this.callParent(this);
    },
    
    getTMinus: function(time) {
        return '3h';
    }
    
});
